<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<jsp:useBean id="p" class="ajax17.Post" scope="session" ></jsp:useBean>
<jsp:useBean id="m" class="ajax17.mem_login" scope="session" ></jsp:useBean>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>留言板</title>
</head>
<body>
<%
String userid="";
String nickname="";
%>
<%
boolean login = m.login();
out.println(login);
%>
<%
if (!m.login()){
%>
 目前尚未登入, 可按<a href="login.jsp">此登入</a>
<%
} else {
	userid  = m.getUserid();
	nickname = m.getNickname();
}
%>
<form action="addpost" method="post">
		帳號:<input id="userid" name="userid" type="text" value="<%=userid %>" />
		<br/>
		匿稱:<input id="nickname" name="nickname" type="text" value="<%=nickname %>" />
		<br/>
		主題:<input id="title" name="title" type="text" value="" />
		<br/>
		留言板:<input id="content" name="content" type="text" value=""/>
		<br/>
		<input type="submit" value="執行"/>
	</form> 
</body>
</html>